CFLAGS += -Wall
CFLAGS += -I ./include

export CC = arm-linux-gcc 
LDFLAGS += -L /home/xiaohuang/download/jpeg-9d/build/lib
LDFLAGS += -L ./lib
LDFLAGS += -ljpeg
LDFLAGS += -llcd
LDFLAGS += -ldl
LDFLAGS += -Wl,-rpath=/root/mylib/

show_img:show_img.c library
	$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)

library:
	$(MAKE) -C ./src

clean:
	$(RM) show_img
	$(MAKE) -C ./src clean

distclean:
	$(MAKE) -C ./src distclean

